import 'package:floor/floor.dart';

@entity
class UserFriendEntity {
  @primaryKey
  int? id;

  int? uId;

  int? fId;

  int? createAt;

  UserFriendEntity(this.id, this.uId, this.fId, this.createAt);

  UserFriendEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createAt = json['createAt'];
    uId = json['userId'];
    fId = json['friendId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createAt'] = this.createAt;
    data['userId'] = this.uId;
    data['friendId'] = this.fId;
    return data;
  }
}
